<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <%- include('./includes/head', { siteTitle: `${post.title} - ${themeConfig.siteName}` }) %>
</head>

<body>
  <div class="layout">
    <%- include('./includes/header') %>
    <%- include('./includes/menu') %>

    <div class="layout-content">
      <div class="layout-content-main">

        <div class="container">
          <div class="layout-post">
            <div class="layout-post-body">
              <div class="row">

                <div class="col-md-12 col-lg-10">
                  <div class="layout-post-main m-right m-md-right">
                    <div class="layout-post-header">
                      <h1 class="layout-post-title"><%= post.title %></h1>
                      <div class="layout-post-meta">
                        <div class="layout-meta-list">
                          <span><%= post.dateFormat %></span>
                        </div>
                        <div class="layout-meta-list">
                          <% post.tags.forEach(function(tag) { %> <a href="<%= tag.link %>" class="post--keyword"
                            data-title="<%= tag.name %>" data-type="post_tag" data-term-id="39"><%= tag.name %></a>
                          <% }); %>
                        </div>
                      </div>
                    </div>
                    <div class="layout-post-content">
                      <div class="layout-post-item">
                        <% if (themeConfig.showFeatureImage && post.feature) { %> <p class="with-img"><img
                            src="<%= post.feature %>" class="attachment-full size-full wp-post-image"
                            alt="<%= post.title %>" /></p>
                        <% } %>
                        <%- post.content %>
                      </div>
                    </div>
                    <div class="layout-post-social">
                      <div class="layout-social-item">
                        <div id="/post/<%= post.fileName %>/" class="leancloud-visitors view"
                          data-flag-title="<%= post.title %>">
                          <span class="post-meta-item-text">阅读 </span>
                          <span class="leancloud-visitors-count"></span>
                        </div>
                      </div>
                    </div>

                    <div class="layout-post-navigation">
                      <div class="row">
                        <% if (post.prevPost && post.nextPost) { %>
                        <div class="post-card col-6">
                          <a href="<%= post.prevPost.link %>" class="post-link">
                            <div class="thumb" style="background-image: url('<%= post.prevPost.feature %>');"></div>
                            <span class="btn-prev"><i class="fa fa-angle-left" aria-hidden='true'></i></span>
                            <div class="thumb-mask"></div>
                          </a>
                        </div>
                        <div class="post-card col-6">
                          <a href="<%= post.nextPost.link %>" class="post-link">
                            <div class="thumb" style="background-image: url('<%= post.nextPost.feature %>');"></div>
                            <span class="btn-next"><i class="fa fa-angle-right" aria-hidden='true'></i></span>
                            <div class="thumb-mask"></div>
                          </a>
                        </div>
                        <% } else if (post.prevPost) { %>
                        <div class="post-card col-12">
                          <a href="<%= post.prevPost.link %>" class="post-link">
                            <div class="thumb" style="background-image: url('<%= post.prevPost.feature %>');"></div>
                            <span class="btn-prev"><i class="fa fa-angle-left" aria-hidden='true'></i></span>
                            <div class="thumb-mask"></div>
                          </a>
                        </div>
                        <% } else if (post.nextPost) { %>
                        <div class="post-card col-12">
                          <a href="<%= post.nextPost.link %>" class="post-link">
                            <div class="thumb" style="background-image: url('<%= post.nextPost.feature %>');"></div>
                            <span class="btn-next"><i class="fa fa-angle-right" aria-hidden='true'></i></span>
                            <div class="thumb-mask"></div>
                          </a>
                        </div>
                        <% } %>
                      </div>
                    </div>

                    <div class="layout-comments"></div>
                    <% if (site.customConfig.valineID && site.customConfig.valineKey) { %>
                    <%- include('./includes/valine') %>
                    <% } %>
                  </div>
                </div>

                <div class="col-md-12 col-lg-2 d-none d-lg-block">
                  <div class="layout-post-sidebar">
                    <div class="layout-sidebar-item">
                      <%- post.toc %>
                    </div>
                  </div>
                </div>

              </div>
            </div>
          </div>
        </div>

      </div>
    </div>

    <div class="layout-totop d-none"><i class="fa fa-angle-up" aria-hidden="true"></i></div>

    <%- include('./includes/footer') %>

  </div>
</body>

</html>